package com.zyz.I_多线程.创建方式.Runnable;

/**
 * @author: vick
 * @Date: 2025/3/21
 * @Description:
 * @version: 1.0
 */
public class Test {
    public static void main(String[] args) {
        //创建自定义实现类对象
        MyRunnable myRunnable = new MyRunnable();
        //创建线程
        Thread thread = new Thread(myRunnable, "子线程1");
        //启动线程
        thread.start();

        //在主线程中，执行for循环
        for (int i = 0; i < 10; i++) {
            System.out.println("main主线程：" + i);
        }
    }
}
